var FrequencyTracker = function () {
  this.arr = []
};

/** 
 * @param {number} number
 * @return {void}
 */
FrequencyTracker.prototype.add = function (number) {
  if (this.arr[number] != null) {
    this.arr[number]++
  } else {
    this.arr[number] = 1
  }
};

/** 
 * @param {number} number
 * @return {void}
 */
FrequencyTracker.prototype.deleteOne = function (number) {
  if (this.arr[number] != null ) {
    this.arr[number]--
  }
};


/** 
 * @param {number} frequency
 * @return {boolean}
 */
FrequencyTracker.prototype.hasFrequency = function (frequency) {
  for (num of this.arr) {
    if (num == frequency) return true
  }

  return false

};

let arr = new FrequencyTracker()
// arr.add(5)
let res = []
arr.deleteOne(9)
arr.deleteOne(8)
arr.deleteOne(1)
arr.deleteOne(4)
res.push(arr.hasFrequency(1))
arr.add(10)
arr.deleteOne(5)
res.push(arr.hasFrequency(1))
arr.deleteOne(10)
arr.deleteOne(9)
arr.deleteOne(10)
arr.deleteOne(1)
res.push(arr.hasFrequency(1))
arr.add(4)
res.push(arr.hasFrequency(1))
arr.deleteOne(4)
res.push(arr.hasFrequency(1))
res.push(arr.hasFrequency(1))
arr.add(10)
res.push(arr.hasFrequency(1))
arr.add(2)
arr.deleteOne(1)
res.push(arr.hasFrequency(2))
arr.add(7)
res.push(arr.hasFrequency(1))
res.push(arr.hasFrequency(1))
/**
 * ["deleteOne","deleteOne","deleteOne","deleteOne","hasFrequency",[9],[8],[1],[4],  [1]
"add","deleteOne","hasFrequency", [10],[5],  [1]
"deleteOne","deleteOne","deleteOne","hasFrequency", [10],[9],[10],  [1]
"add","hasFrequency", [4],  [1]
"deleteOne","hasFrequency", [4],   [1]
"hasFrequency", [1]
"add","hasFrequency", [10],[1]
"add","deleteOne","hasFrequency", [2],[1],[2]
"add","hasFrequency",[7],[1]
"hasFrequency","add"] [1],[6]
 * 
 */